package com.wyx.bbs.service;

import com.alibaba.fastjson.JSONObject;
import com.wyx.bbs.domain.User;
import com.wyx.bbs.mapper.UserMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author: Wu YunXia
 * @Description:
 * @Date: Created in 10:00 2021/3/31
 * @Modefied By:
 */
@Service
public class UserService {

    @Resource
UserMapper userMapper;

/**
 * 添加用户
 * @param user
 * @return
 */
public int insert (User user){
    return userMapper.insertUser(user);
}


/**
 * 按appid查询用户
 * @return
 */
public User getUserByOpenId(String openId){
    return userMapper.getUserByOpenId(openId);
}


}
